package com.hengyuan.aidog.result;

public class ResultUtil {

    private static final Integer SUCCESS = 0;
    private static final Integer FAIL = 1;

    public static Result success(Object object){
        return Result.builder()
                .code(SUCCESS)
                .msg("成功")
                .data(object)
                .build();
    }

    public static Result success(){
        return success(null);
    }


    public static Result error(Integer code,String msg){
        return Result.builder()
                .code(FAIL)
                .msg(msg)
                .build();
    }



}
